﻿<UserControl x:Class="Ares.GUI.Views.RevertProjectView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <ListBox 
            Grid.Row="0" 
            ItemsSource="{Binding AllVersions, Mode=TwoWay}" >
            <ListBox.ItemTemplate>
                <!-- The Datatemplate -->
                <DataTemplate DataType="ListBoxItem">
                    <Border BorderThickness="0" BorderBrush="#000" >
                        <Border.BitmapEffect>
                            <DropShadowBitmapEffect Color="#ccc" Direction="-45"
                    ShadowDepth="3" Softness=".2" />
                        </Border.BitmapEffect>
                        <StackPanel Width="100" Background="White" Orientation="Horizontal">
                            <RadioButton GroupName="RevertGroup" Margin="5" Content="{Binding Timestamp}" />
                            <!--<StackPanel Visibility="{Binding ControlsVisible}" >
                                <WrapPanel>
                                    <Button Margin="3" Command="{Binding BackupCommand}" Content="Start!" />
                                    <Button Margin="3" Command="{Binding EditCommand}" Content="Edit" />
                                    <Button Margin="3" Command="{Binding DeleteCommand}" Content="Delete" />
                                </WrapPanel>
                                <Button Margin="5" Command="{Binding RevertCommand}" Content="Revert" />
                            </StackPanel>
                            <StackPanel Visibility="{Binding ProgressVisible}">
                                <Label Content="{Binding Progress.StatusMessage}" />
                                <ProgressBar IsIndeterminate="False" Value="{Binding Progress.Progress}" Maximum="{Binding Progress.ProgressMax}" />
                            </StackPanel>-->
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <ListBox.ItemContainerStyle>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="Margin" Value="5" />
                    <Setter Property="Padding" Value="0" />
                    <Style.Resources>
                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                        <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>
                    </Style.Resources>
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>
        <WrapPanel HorizontalAlignment="Right" Grid.Row="1">
            <Button Margin="5">Revert</Button>
            <Button Margin="5">Cancel</Button>
        </WrapPanel>
    </Grid>
</UserControl>
